package me.idashu.attg.service;

import java.util.List;

import me.idashu.attg.domain.CcollectEntity;
import me.idashu.attg.domain.ContextEntity;
import me.idashu.attg.persistence.CcollectMapper;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CcollectService {
    @Autowired
    private CcollectMapper ccollectMapper;
    
    public void insertCcollect(CcollectEntity ccollectEntity){
    	ccollectMapper.insertCcollect(ccollectEntity);
    }
    
    public void deleteCcollect(CcollectEntity ccollectEntity){
    	ccollectMapper.deleteCcollect(ccollectEntity);
    }
    
    public List<ContextEntity> findContextsCollectByUserId(long userId){
    	List<ContextEntity> contexts = ccollectMapper.findContextsCollectByUserId(userId);
    	return contexts;
    }
    
}
